package com.fable.sp.core.widget;

import java.util.Enumeration;
import java.util.Map;

/**
 * .
 *
 * @author stormning on 16/8/8.
 */
public interface WidgetSession {

    int APPLICATION_SCOPE = 0x01;

    int WIDGET_SCOPE = 0x02;


    Object getAttribute(String name);

    Object getAttribute(String name, int scope);

    Enumeration<String> getAttributeNames();

    Enumeration<String> getAttributeNames(int scope);

    long getCreationTime();

    String getId();

    long getLastAccessedTime();

    int getMaxInactiveInterval();

    void setMaxInactiveInterval(int interval);

    void invalidate();

    boolean isNew();

    void removeAttribute(String name);

    void removeAttribute(String name, int scope);

    void setAttribute(String name, Object value);

    void setAttribute(String name, Object value, int scope);


    Map<String, Object> getAttributeMap();

    Map<String, Object> getAttributeMap(int scope);
}
